package com.jrx.anytxn.transaction.job.cmpsCrt.step;

import com.jrx.anytxn.transaction.entity.AmLoanAccountInfo;
import com.jrx.anytxn.transaction.entity.BtGuaranteeList;
import com.jrx.anytxn.transaction.service.ICmpsCrtService;
import org.springframework.batch.item.ItemProcessor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 代偿回购数据准备
 */
@Service
public class CmpsCrtPreProcessor implements ItemProcessor<AmLoanAccountInfo, BtGuaranteeList> {

    @Autowired
    private ICmpsCrtService cmpsCrtService;

    @Override
    public BtGuaranteeList process(AmLoanAccountInfo amLoanAccountInfo) throws Exception {
        return cmpsCrtService.createGuarantee(amLoanAccountInfo);
    }
}
